fix: replace hardcoded POSTGRES_PASSWORD with runtime-generated random password#451
Merged
Merged
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
BigSimmo
marked this pull request as ready for review
July 9, 2026 13:09
BigSimmo
enabled auto-merge (squash)
July 9, 2026 13:09
…m password GitGuardian flagged the hardcoded 'postgres' password in the scratch Docker container setup. Replace it with a 16-byte cryptographically random hex string generated at runtime using Node's built-in crypto module. The password is only used for the disposable local scratch container and is never stored or transmitted — making it random also removes any misleading suggestion that 'postgres' is a meaningful credential here. Closes #450
auto-merge was automatically disabled
July 9, 2026 13:14
Head branch was pushed to by a user without write access
Copilot
AI
changed the title
[WIP] Fix hardcoded secret detected by GitGuardian
fix: replace hardcoded POSTGRES_PASSWORD with runtime-generated random password
Jul 9, 2026
BigSimmo
enabled auto-merge (squash)
July 9, 2026 13:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitGuardian flagged a hardcoded
POSTGRES_PASSWORD=postgresin the drift manifest generation script. While this only affects a disposable local scratch Docker container, the hardcoded credential triggers secret scanning alerts and sets a bad precedent.Changes
scripts/generate-drift-manifest.ts: ImportrandomBytesfromnode:cryptoand generate a 32-char hex password at runtime instead of using the hardcoded"postgres"literalThe password is only needed for container initialisation — subsequent
psqlcalls usedocker exec(peer/trust auth inside the container) and are unaffected.Verification
npm run verify:cheapnpm run verify:uiwhen UI, routing, styling, browser behavior, reduced-motion, or forced-colors behavior changednpm run verify:releasebefore release or handoff confidence claimsnpm run format:checknpm run eval:retrieval:quality(must stay 36/36) when retrieval, ranking, selection, chunking, or scoring behavior changed — CI cannot run it (needs live keys), so run it locally and paste the summary. A metadata/governance-weighting change once buried correct docs (recall 1.0→0.76) and only this eval caught it.npm run eval:rag -- --limit 15+npm run eval:quality -- --rag-onlywhen answer generation, the synthesis prompt, or answer post-processing changed (grounded-supported must not drop; citation-failure 0)npm run check:production-readinesswhen clinical workflow, privacy, environment, Supabase, source governance, or deployment behavior changednpm run check:deployment-readinesswhen deployment startup, hosting, or rollout behavior changedClinical Governance Preflight
Complete this section when the change touches ingestion, answer generation, search/ranking, source rendering, document access, privacy, production env, or clinical output.
Clinical KB Database(sjrfecxgysukkwxsowpy)Notes
node:cryptois a Node.js built-in.